﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MettingOrder
{
    public class Result
    {
        public bool IsSuccess { get; set; } = true;
        public Object Data { get; set; }
        public string Msg { get; set; } = "";
    }
    public class JsonHelper
    {
        public static Result Success(Object data = null, string msg = "操作成功")
        {
            return (new Result
            {
                Data = data,
                Msg = msg,
            });
        }
        public static Result Error(string msg = "操作失败", Object data = null)
        {
            return (new Result
            {
                IsSuccess = false,
                Data = data,
                Msg = msg,
            });
        }
    }
}